import Vue from 'vue'
import Vuex from 'vuex'
// 机构管理
import branchHospital from './branch-hospital';
import {vuexDebugPluginFn} from 'vue-debug-plugin';
import serviceMap from '@/services/index.js';
let vuexDebugPlugin = vuexDebugPluginFn({
  isDev(location){   // 默认为false 不传插件会直接不加载
      let localIdentifyings = ['8082','8081','8080','test'];
      let isDev = localIdentifyings.some(id => location.href.indexOf(id) !== -1)
      return isDev
  },
  Vue,
  serviceMap,
  hasElementUI: true  // 项目是否接入了elementUi 
})
Vue.use(Vuex)
export default new Vuex.Store({
  plugins: [
    // logger({
    //   collapsed: true
    // }),
    vuexDebugPlugin()
  ],
  state: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    branchHospital
  }
})
